From 29b29227a7bc4028eaed778ebc77dd4ea1b8c39f Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sun, 26 Nov 2017 15:51:31 -0700 Subject: [PATCH] update appveyor build. run basic tests. build windows installer. archive installer. --- appveyor.yml | 85 +++++++++++++++++++++++++++++++++++++++++++++--- gui/setup.iss | 22 ++++++------- gui/setup.iss.in | 22 ++++++------- 3 files changed, 102 insertions(+), 27 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fc11c96fa..a3f5bcc1d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,19 +5,94 @@ environment: # MinGW - name: win32 platform: mingw - qt: 5.9\mingw53_32 + qt: 5.5\mingw492_32 + tools: mingw492_32 + # MinGW + - name: win32 + platform: mingw + qt: 5.6\mingw49_32 + tools: mingw492_32 + # MinGW + # - name: win32 + # platform: mingw + # qt: 5.9\mingw53_32 + # tools: mingw530_32 + # MSVC x32 + - name: win32 + platform: x86 + qt: 5.6\msvc2015 # MSVC x64 - name: win64 platform: amd64 - qt: 5.9\msvc2015_64 + qt: 5.6\msvc2015_64 init: - if %platform%==mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=% - - if %platform%==mingw set PATH=C:\Qt\Tools\mingw530_32\bin;%PATH% + - if %platform%==mingw set PATH=C:\Qt\Tools\%tools%\bin;%PATH% - set PATH=C:\Qt\%qt%\bin;%PATH% - if not %platform%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform% # Flesh out with amd64/msvc cases later. build_script: - - qmake GPSBabel.pro - - if not %platform%==mingw (nmake) else (mingw32-make) + - ps: | + if (($env:platform -eq "mingw") -and ($env:qt -eq "5.5\mingw492_32")) + { + Get-Location + qmake -query + # mimic creator shadow build to match Inno setup file + New-Item ..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release -type directory -force + cd ..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release + qmake ..\gpsbabel\GPSBabel.pro -spec win32-g++ + mingw32-make qmake_all + mingw32-make + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } + # copy GPSBabel.exe for use by test_script + New-Item ..\gpsbabel\release -type directory -force + Copy-Item release\GPSBabel.exe ..\gpsbabel\release\GPSBabel.exe + cd ..\gpsbabel + New-Item build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release -type directory -force + cd build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release + qmake ..\gui\app.pro -spec win32-g++ + mingw32-make qmake_all + mingw32-make + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } + lupdate ..\gui\app.pro + lrelease ..\gui\app.pro + # windeployqt in 5.5.1 suffers from bug + # https://bugreports.qt.io/browser/QTBUG-48946 + # which trashes the translations. Work around + # by using the next version of windeployqt which had this + # bug fixed. + # use --plugindir option to locate the plugins. + C:\Qt\5.6\mingw49_32\bin\windeployqt.exe --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe + & 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe' ..\gui\setup.iss + cd .. + $sha=(git rev-parse --short HEAD) + Get-ChildItem .\gui\release\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha).exe" } + } + elseif ($env:platform -eq "mingw") + { + qmake GPSBabel.pro + mingw32-make + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } + } + else + { + qmake GPSBabel.pro + nmake + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } + } + # work around issue with standard error output causing a build failure by making sure last command succeeds. + # see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status + Write-Host "Finished build_script" + +test_script: + - ps: | + $env:projdir=(C:\msys64\usr\bin\bash.exe -c "pwd") + C:\msys64\usr\bin\bash.exe -lc "echo $env:projdir" + # work around issue with standard error output from xmllint causing a build failure by redirecting stderr. + # in this case making sure the last command succeeds is not sufficient. + # see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status + C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; PNAME=./release/GPSBabel.exe GBTEMP=./gbtemp ./testo 2>&1" + Write-Host "Finished test_script with exit status $LastExitCode" + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } diff --git a/gui/setup.iss b/gui/setup.iss index b60c3b00d..c5734a05b 100644 --- a/gui/setup.iss +++ b/gui/setup.iss @@ -6,7 +6,7 @@ ; Script for generating installation setup program for GPSBabel ; Uses the Inno setup compiler. Typically used from the command ; line "makesetup.bat" which copies QT system files which -; the Innosetup compiler cannot handle. +; the Innosetup compiler cannot handle. ; ; So it is not a good idea to run this file from the Inno Setup GUI. @@ -39,27 +39,27 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] ; This isn't as wreckless as it seems; these directories are populated on a ; controlled way by the batch file. -Source: qtdir\bin\*.dll; DestDir: "{app}"; Flags: ignoreversion -Source: qtdir\plugins\*; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs +;Source: qtdir\bin\*.dll; DestDir: "{app}"; Flags: ignoreversion +;Source: qtdir\plugins\*; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs Source: gmapbase.html; DestDir: "{app}"; Flags: ignoreversion Source: qt.conf; DestDir: "{app}"; Flags: ignoreversion -Source: ..\build-app-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabelfe.exe; DestDir: "{app}"; Flags: ignoreversion -Source: ..\..\build-GPSBabel-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion +Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion ; Source: release\help\*; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs ; Translation strings extracted from source code. Include it in the dist -; so that users can translate if they want to. -; Source: gpsbabel_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion -; Source: gpsbabelfe_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion +; so that users can translate if they want to. +; Source: gpsbabel_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion +; Source: gpsbabelfe_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion ; Compiled translation strings that are used at runtime. -; Source: gpsbabel_*.qm; DestDir: "{app}\translations"; Flags: ignoreversion -Source: gpsbabelfe*.qm; DestDir: "{app}\translations"; Flags: ignoreversion +; Source: gpsbabel_*.qm; DestDir: "{app}\translations"; Flags: ignoreversion +Source: gpsbabelfe*.qm; DestDir: "{app}\translations"; Flags: ignoreversion ; Now translations from Qt's own UI stuff. -Source: qtdir\translations\*; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs +;Source: qtdir\translations\*; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs ; Miscellaneous Source: COPYING.txt; DestDir: {app}; Flags: ignoreversion diff --git a/gui/setup.iss.in b/gui/setup.iss.in index 3ef0a7340..2c14bb8f1 100755 --- a/gui/setup.iss.in +++ b/gui/setup.iss.in @@ -6,7 +6,7 @@ ; Script for generating installation setup program for GPSBabel ; Uses the Inno setup compiler. Typically used from the command ; line "makesetup.bat" which copies QT system files which -; the Innosetup compiler cannot handle. +; the Innosetup compiler cannot handle. ; ; So it is not a good idea to run this file from the Inno Setup GUI. @@ -39,27 +39,27 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] ; This isn't as wreckless as it seems; these directories are populated on a ; controlled way by the batch file. -Source: qtdir\bin\*.dll; DestDir: "{app}"; Flags: ignoreversion -Source: qtdir\plugins\*; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs +;Source: qtdir\bin\*.dll; DestDir: "{app}"; Flags: ignoreversion +;Source: qtdir\plugins\*; DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs Source: gmapbase.html; DestDir: "{app}"; Flags: ignoreversion Source: qt.conf; DestDir: "{app}"; Flags: ignoreversion -Source: ..\build-app-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabelfe.exe; DestDir: "{app}"; Flags: ignoreversion -Source: ..\..\build-GPSBabel-Desktop_Qt_5_2_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion +Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion ; Source: release\help\*; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs ; Translation strings extracted from source code. Include it in the dist -; so that users can translate if they want to. -; Source: gpsbabel_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion -; Source: gpsbabelfe_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion +; so that users can translate if they want to. +; Source: gpsbabel_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion +; Source: gpsbabelfe_*.ts; DestDir: "{app}\translations"; Flags: ignoreversion ; Compiled translation strings that are used at runtime. -; Source: gpsbabel_*.qm; DestDir: "{app}\translations"; Flags: ignoreversion -Source: gpsbabelfe*.qm; DestDir: "{app}\translations"; Flags: ignoreversion +; Source: gpsbabel_*.qm; DestDir: "{app}\translations"; Flags: ignoreversion +Source: gpsbabelfe*.qm; DestDir: "{app}\translations"; Flags: ignoreversion ; Now translations from Qt's own UI stuff. -Source: qtdir\translations\*; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs +;Source: qtdir\translations\*; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs ; Miscellaneous Source: COPYING.txt; DestDir: {app}; Flags: ignoreversion -- 2.30.2